home *** CD-ROM | disk | FTP | other *** search
/ Nothing but Tetris / Nothing but Tetris.iso / amiga / workbench_tris / con_input.h next >
C/C++ Source or Header  |  1992-11-19  |  1KB  |  33 lines

  1. /*
  2. Copyright (c) 1992, Trevor Smigiel.  All rights reserved.
  3.  
  4. (I hope Commodore doesn't mind that I borrowed their copyright notice.)
  5.  
  6. The source and executable code of this program may only be distributed in free
  7. electronic form, via bulletin board or as part of a fully non-commercial and
  8. freely redistributable diskette.  Both the source and executable code (including
  9. comments) must be included, without modification, in any copy.  This example may
  10. not be published in printed form or distributed with any commercial product.
  11.  
  12. This program is provided "as-is" and is subject to change; no warranties are
  13. made.  All use is at your own risk.  No liability or responsibility is assumed.
  14.  
  15. */
  16.  
  17. /* This struct is used to pass data from main task to key task, */
  18. /* and also from key task to input handler. */
  19. struct ControlData { 
  20.     struct Task    *cd_Parent;
  21.     struct Task    *cd_Task;
  22.     struct MsgPort *cd_MsgPort;        /* points to port to send msg to on key/timer/quit events */
  23.     ULONG           cd_State;        /* Pointer to a var which holds the State of keys in cd_Keys */
  24.     char           *cd_Keys;        /* Raw key codes to act upon */
  25.     struct TBoard  *cd_Board;
  26. };
  27.  
  28. struct ControlMsg {
  29.     struct Message cm_Msg;
  30.     struct ControlData *cm_CData; /* Which task is this message coming from */
  31.     ULONG cm_State;
  32. };
  33.